package org.nobody.mallb2c.mallproduct.feign.fallback;

import lombok.extern.slf4j.Slf4j;
import org.nobody.common.exception.ResultCodeEnum;
import org.nobody.common.utils.R;
import org.nobody.mallb2c.mallproduct.feign.SeckillFeignService;
import org.springframework.stereotype.Component;

/**
 * @author 3489309323@qq.com
 * @create 2020-09-29-17:41
 */
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {
  @Override
  public R getSkuSeckillInfo(Long skuId) {
    log.info("SeckillFeignService ---> getSkuSeckillInfo 熔断,调用熔断回调");
    return R.error(ResultCodeEnum.TOO_MANY_REQUEST.getCode(),ResultCodeEnum.TOO_MANY_REQUEST.getMsg());
  }
}
